package kr.hkit.powerjava.chapter12.pro;

public abstract class TwoDimShape extends Shapes {
	public abstract double getArea();
}

class Ellipse extends TwoDimShape {
	double r = rnd.nextDouble();
	
	public double getArea() {
		double area;
		area = PI * r * r;
		return area;
	}
}

class Rectangles extends TwoDimShape {
	double a = rnd.nextDouble();
	double b = rnd.nextDouble();
	
	public double getArea() {
		double area;
		area = a * b;
		return area;
	}
}

class Triangles extends TwoDimShape {
	double a = rnd.nextDouble();
	double b = rnd.nextDouble();
	
	public double getArea() {
		double area;
		area = (a * b)/2;
		return area;
	}
}
